package cn.ift8.spring.normal.annotation.scan;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * Created by IFT8
 * on 2015/8/16.
 */
@Component("scanClasses") //ID 可不写
public class ScanClasses {
    /**
     * 基本类型不适合用注解
     */
    private Long cid;
    private String cname;

    /**
     * 引用类型适合用注解
     */

    @Resource(name= "scanStudent")//填bean的ID
    private ScanStudent student;

    public void showStudent(){
        System.out.println(this.student.toString());
    }
}
